package model

import "time"

type Payment struct {
	ID             uint `gorm:"primary_key"`
	Uid            uint
	CreatedAt      time.Time
	FinishAt       time.Time
	GoodsName      string
	Price          int
	QrId           string
	Status         int  `gorm:"default:'0'"`
	PayType        string
	Tid            string
	OuterTid       string
	TransactionTid string
	CoinBefore     int
	CoinAfter      int
}

const (
	Failed  = iota - 1
	Pending
	Success
)

func (Payment) TableName() string {
	return "payment"
}
